Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add page on magicgui type registration #399

Merged
merged 14 commits into from
Apr 16, 2024

Conversation

lucyleeow
Copy link
Collaborator

@lucyleeow lucyleeow commented Apr 9, 2024

References and relevant issues

Came about after #68

Details magicgui type registration, in particular the reset_choices connection to layers we do for all widgets that have that method.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 9, 2024
@lucyleeow
Copy link
Collaborator Author

cc @DragaDoncila

DragaDoncila
DragaDoncila previously approved these changes Apr 10, 2024
Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm sorry, when I approved I think I'd only loaded one commit and this PR seemed much smaller... Let me actually go through this sorry

@DragaDoncila DragaDoncila dismissed their stale review April 10, 2024 01:04

Didn't see the whole PR oops

Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok left some comments @lucyleeow 🙏

docs/developers/architecture/index.md Outdated Show resolved Hide resolved
docs/developers/architecture/magicgui_type_reg.md Outdated Show resolved Hide resolved
docs/developers/architecture/magicgui_type_reg.md Outdated Show resolved Hide resolved
docs/developers/architecture/magicgui_type_reg.md Outdated Show resolved Hide resolved
@lucyleeow
Copy link
Collaborator Author

lucyleeow commented Apr 10, 2024

Thank you @DragaDoncila! I've updated

Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucyleeow sorry, couple more comments. I think this is looking good!

docs/developers/architecture/magicgui_type_reg.md Outdated Show resolved Hide resolved
docs/developers/architecture/magicgui_type_reg.md Outdated Show resolved Hide resolved
`choices` callable. This callable is either `get_layers_data` or `get_layers`.
These functions retrieve the closest parent `Viewer` of the native
{class}`~magicgui.widgets.bases.CategoricalWidget` widget and returns a list of
{class}`~napari.layers.Layer` or tuple of format ('layer name', `<LayerType>Data`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{class}`~napari.layers.Layer` or tuple of format ('layer name', `<LayerType>Data`).
{class}`~napari.layers.Layer` or tuple of format `(layer name, <LayerType>Data)`.

@lucyleeow
Copy link
Collaborator Author

Thanks @DragaDoncila, changes made!

Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucyleeow approved with just two more comments to break up a big paragraph (looks a bit intense on the built docs otherwise)

docs/developers/architecture/magicgui_type_reg.md Outdated Show resolved Hide resolved
@DragaDoncila DragaDoncila added this to the 0.5.0 milestone Apr 12, 2024
@DragaDoncila DragaDoncila merged commit 2c09df0 into napari:main Apr 16, 2024
7 checks passed
@lucyleeow lucyleeow deleted the magicgui_int branch April 16, 2024 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants